package se.statifyme.server.services;

import java.util.Date;

import javax.ws.rs.Path;

import se.statifyme.server.declaration.ServiceType;
import se.statifyme.server.entities.KeyValueRecord;
import se.statifyme.server.store.KeyValueStore;
import se.statifyme.shared.RecordServiceConstants;

import com.google.inject.Inject;

@Path("/" + RecordServiceConstants.REST_PATH + "/keyvalue")
@ServiceType(displayName = "Key-value")
public class KeyValueServiceImpl extends RecordServiceImpl<KeyValueRecord> {

	@Inject
	private KeyValueStore store;

	public KeyValueStore getStore() {
		return store;
	}

	public void setStore(KeyValueStore store) {
		this.store = store;
	}
	
	@Override
	protected KeyValueRecord createExampleEntity() {
		KeyValueRecord result = new KeyValueRecord();
		result.setDate(new Date());
		result.setId("abc123");
		result.setKey("Weather");
		result.setValue("Sunny");
		return result;
	}

}
